-- GENERATED SPELL FOR [Scourge Death Knight] --


function spell0_32486(pUnit, Event) --@Blood Leech,Heal--
pUnit:FullCastSpellOnTarget(22644,pUnit)
pUnit:RegisterEvent('Sorts_32486', 611, 1)
end

function spell1_32486(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32486', 579, 1)
end

function spell2_32486(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(55209,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32486', 0, 1)
end

function Sorts_32486(pUnit, Event)
local choix_sorts_32486 = math.random(0, 2)
if choix_sorts_32486 == 0 then
pUnit:RegisterEvent('spell0_32486', 1, 1)
end
if choix_sorts_32486 == 1 then
pUnit:RegisterEvent('spell1_32486', 1, 1)
end
if choix_sorts_32486 == 2 then
pUnit:RegisterEvent('spell2_32486', 1, 1)
end
end

function mob32486_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32486', math.random(1500, 3000), 1)
end

function mob32486_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32486_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32486_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32486, 1, 'mob32486_Action')
RegisterUnitEvent(32486, 2, 'mob32486_Leave')
RegisterUnitEvent(32486, 3, 'mob32486_Kill')
RegisterUnitEvent(32486, 4, 'mob32486_Die')
